window.addEventListener("load",function(){
	
	// 选项卡
	var gyzy_tab = document.querySelectorAll(".gyzy_tab");
	var show_tab = document.querySelectorAll(".show_tab");
	
	for(var i=0;i<gyzy_tab.length;i++){
		
		gyzy_tab[i].setAttribute('index',i);
		
		gyzy_tab[i].onclick = function(){
			var index = this.getAttribute('index');
			for(var j=0;j<gyzy_tab.length;j++){
				// 删除指定类名
				gyzy_tab[j].classList.remove('guanyuzhuye_active');
				show_tab[j].classList.remove('gyzy_show');
			}
			// 添加指定类名
			gyzy_tab[index].classList.add('guanyuzhuye_active');
			show_tab[index].classList.add('gyzy_show');
		}
	}
	
	// 大事件选项卡
	var dashijian_tab  = document.querySelectorAll(".dashijian");
	var dashijian_xian = document.querySelectorAll(".lx");
	var dashijian_nei  = document.querySelectorAll(".dashijian_neirong .dashijian_nei");
	
	for(var i=0;i<dashijian_tab.length;i++){
		dashijian_tab[i].setAttribute('index',i);
		dashijian_tab[i].onclick = function(){
			var index = this.getAttribute('index');
			for(var j=0;j<dashijian_tab.length;j++){
				dashijian_xian[j].classList.remove('lvxian');
				dashijian_nei[j].classList.remove('neirong_show');
			}
			dashijian_xian[index].classList.add('lvxian');
			dashijian_nei[index].classList.add('neirong_show');
		}
	}
	
	var hezuohuoban = document.querySelector(".hezuohuoban");
	var guanyuzhuye =document.querySelector(".guanyuzhuye");
	var bottom = document.querySelector(".bottom");
	hezuohuoban.onclick = function(){
		bottom.style.display ="block";
		guanyuzhuye.style.height = "1530px";
	}
	
	
})